package com.qfedu.mbti.controller;

import com.qfedu.mbti.config.SystemConfig;
import com.qfedu.mbti.service.UserLogService;
import com.qfedu.mbti.vo.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * 用户日志表(UserLog)表控制层
 *
 * @author makejava
 * @since 2024-11-04 11:43:41
 */
@RestController
@RequestMapping("api/log")
@Tag(name = "操作日志")
@CrossOrigin
public class UserLogController {
    /**
     * 服务对象
     */
    @Resource
    private UserLogService service;

    @Operation(summary = "查询日志")
    @GetMapping("all")
    public R all(HttpServletRequest request){
        return service.queryByUid(request.getHeader(SystemConfig.HEADER_TOKEN));
    }

}